//通过键盘输入你生日和当前日期，计算你的年龄
//                 2000 11 13   2024 11 5

#include <stdio.h>
int main(){
	int year = 0; 
	int mouth = 0;
	int day = 0;
	int birthyear = 0;
	int birthmouth = 0;
	int birthday = 0;
	int age = 0;
	printf("输入自己的生日：");
	scanf("%d%d%d",&birthyear,&birthmouth,&birthday);
	printf("输入当前日期：");
	scanf("%d%d%d",&year,&mouth,&day);

	if(mouth <= birthmouth && day <= birthday){
		age = year - birthyear -1;
		printf("输出年龄为%d\n",age);
	} else{
		age = year - birthyear ;
		printf("输出年龄为%d\n",age);
	} 

	return 0;
}
